package com.atguigu.mapper;

import com.atguigu.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: liuaojun
 * @CreateTime: 2025-01-21
 * @Description:
 * @Version: 1.0
 */
@Mapper
public interface UserMapper {
    /**
    * @Author:liuaojun
    * @Date:2025-01-21 16:04
    * @Description:增加
    */
    void insertUser(User user);

    /**
    * @Author:liuaojun
    * @Date:2025-01-21 16:04
    * @Description:修改
    */
    void updateUser(User user);

    /**
    * @Author:liuaojun
    * @Date:2025-01-21 16:04
    * @Description:查询（通过ID）
    */
    User getUserById(int id);


    /**
    * @Author:liuaojun
    * @Date:2025-01-21 16:04
    * @Description:查询所有
    */
    List<User> selectAllUser();

    /**
    * @Author:liuaojun
    * @Date:2025-01-21 16:05
    * @Description:删除
    */
    void deleteUserById(int id);
}
